import { Module } from "@nestjs/common";
import { AppController } from "./app.controller";
import { AppService } from "./app.service";
import { UserModule } from "./user/user.module";
import { TypeOrmModule } from "@nestjs/typeorm";
import { AuthModule } from "./auth/auth.module";
import { DataSource } from "typeorm";
import { RoleModule } from "./role/role.module";
@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: "mysql",
      host: "47.101.143.208",
      port: 3306,
      username: "root",
      password: "lzqq199536!",
      database: "mysqlApp",
      entities: [],
      autoLoadEntities: true
    }),
    UserModule,
    AuthModule,
    RoleModule
  ],
  controllers: [AppController],
  providers: [AppService]
})
export class AppModule {
  constructor(private dataSource: DataSource) {}
}
